#ifndef MAPVIEW_HPP
#define MAPVIEW_HPP

#include <QtGui>
#include "mapitem.hpp"

class MapView : public QGraphicsView {
	Q_OBJECT

	public:
		MapView(QWidget *parent = 0, QStatusBar *statusBar = 0);
		QGraphicsScene*  getScene();
		QGraphicsPixmapItem* getFond();
		void changeBackground(QString &path_background);
		void clear();

	public slots:
		void canSave();

	signals:
		void changed();

	protected:
	   void mousePressEvent(QMouseEvent *event);
	   void mouseMoveEvent(QMouseEvent *event);
	   void dropEvent(QDropEvent *event);
	   void dragEnterEvent(QDragEnterEvent *event);
	   void dragMoveEvent(QDragMoveEvent *event);

	private:
		QGraphicsScene *_scene;		// Scene
		QPixmap _back_pixmap;		// Pixmap fond;
		QGraphicsPixmapItem *_back; // Pixmap Fond Scene
		QStatusBar *_statusBar;		// Status Bar's Window main
};

#endif // MAPVIEW_HPP
